Optimal. Leaf size=78 \[ \frac {g (a+b x)^2 \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )}{2 b}-\frac {B g (b c-a d)^2 \log (c+d x)}{b d^2}+\frac {B g x (b c-a d)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2525, 12, 43} \[ \frac {g (a+b x)^2 \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )}{2 b}-\frac {B g (b c-a d)^2 \log (c+d x)}{b d^2}+\frac {B g x (b c-a d)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 43
Rule 2525
Rubi steps
\begin {align*} \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right ) \, dx &=\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{2 b}-\frac {B \int \frac {2 (b c-a d) g^2 (-a-b x)}{c+d x} \, dx}{2 b g}\\ &=\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{2 b}-\frac {(B (b c-a d) g) \int \frac {-a-b x}{c+d x} \, dx}{b}\\ &=\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{2 b}-\frac {(B (b c-a d) g) \int \left (-\frac {b}{d}+\frac {b c-a d}{d (c+d x)}\right ) \, dx}{b}\\ &=\frac {B (b c-a d) g x}{d}-\frac {B (b c-a d)^2 g \log (c+d x)}{b d^2}+\frac {g (a+b x)^2 \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{2 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 72, normalized size = 0.92 \[ \frac {g \left ((a+b x)^2 \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )-\frac {2 B (a d-b c) ((a d-b c) \log (c+d x)+b d x)}{d^2}\right )}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.64, size = 149, normalized size = 1.91 \[ \frac {A b^{2} d^{2} g x^{2} - 2 \, B a^{2} d^{2} g \log \left (b x + a\right ) + 2 \, {\left (B b^{2} c d + {\left (A - B\right )} a b d^{2}\right )} g x - 2 \, {\left (B b^{2} c^{2} - 2 \, B a b c d\right )} g \log \left (d x + c\right ) + {\left (B b^{2} d^{2} g x^{2} + 2 \, B a b d^{2} g x\right )} \log \left (\frac {d^{2} e x^{2} + 2 \, c d e x + c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )}{2 \, b d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.90, size = 128, normalized size = 1.64 \[ -\frac {B a^{2} g \log \left (b x + a\right )}{b} + \frac {1}{2} \, {\left (A b g + B b g\right )} x^{2} + \frac {1}{2} \, {\left (B b g x^{2} + 2 \, B a g x\right )} \log \left (\frac {d^{2} x^{2} + 2 \, c d x + c^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) + \frac {{\left (B b c g + A a d g\right )} x}{d} - \frac {{\left (B b c^{2} g - 2 \, B a c d g\right )} \log \left (-d x - c\right )}{d^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 340, normalized size = 4.36 \[ \frac {B b g \,x^{2} \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )}{2}+\frac {A b g \,x^{2}}{2}+B a g x \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )+A a g x +\frac {B \,a^{2} g \ln \left (\frac {1}{b x +a}\right )}{b}+\frac {B \,a^{2} g \ln \left (\frac {\left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2} e}{b^{2}}\right )}{2 b}-\frac {B \,a^{2} g \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{b}-\frac {2 B a c g \ln \left (\frac {1}{b x +a}\right )}{d}+\frac {2 B a c g \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{d}-B a g x +\frac {B b \,c^{2} g \ln \left (\frac {1}{b x +a}\right )}{d^{2}}-\frac {B b \,c^{2} g \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{d^{2}}+\frac {B b c g x}{d}+\frac {A \,a^{2} g}{2 b}-\frac {B \,a^{2} g}{b}+\frac {B a c g}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.44, size = 250, normalized size = 3.21 \[ \frac {1}{2} \, A b g x^{2} + {\left (x \log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) - \frac {2 \, a \log \left (b x + a\right )}{b} + \frac {2 \, c \log \left (d x + c\right )}{d}\right )} B a g + \frac {1}{2} \, {\left (x^{2} \log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) + \frac {2 \, a^{2} \log \left (b x + a\right )}{b^{2}} - \frac {2 \, c^{2} \log \left (d x + c\right )}{d^{2}} + \frac {2 \, {\left (b c - a d\right )} x}{b d}\right )} B b g + A a g x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.38, size = 120, normalized size = 1.54 \[ x\,\left (\frac {g\,\left (2\,A\,a\,d+A\,b\,c-B\,a\,d+B\,b\,c\right )}{d}-\frac {A\,g\,\left (a\,d+b\,c\right )}{d}\right )+\ln \left (\frac {e\,{\left (c+d\,x\right )}^2}{{\left (a+b\,x\right )}^2}\right )\,\left (\frac {B\,b\,g\,x^2}{2}+B\,a\,g\,x\right )+\frac {A\,b\,g\,x^2}{2}-\frac {B\,a^2\,g\,\ln \left (a+b\,x\right )}{b}+\frac {B\,c\,g\,\ln \left (c+d\,x\right )\,\left (2\,a\,d-b\,c\right )}{d^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.92, size = 250, normalized size = 3.21 \[ \frac {A b g x^{2}}{2} - \frac {B a^{2} g \log {\left (x + \frac {\frac {B a^{3} d^{2} g}{b} + 2 B a^{2} c d g - B a b c^{2} g}{B a^{2} d^{2} g + 2 B a b c d g - B b^{2} c^{2} g} \right )}}{b} + \frac {B c g \left (2 a d - b c\right ) \log {\left (x + \frac {3 B a^{2} c d g - B a b c^{2} g - B a c g \left (2 a d - b c\right ) + \frac {B b c^{2} g \left (2 a d - b c\right )}{d}}{B a^{2} d^{2} g + 2 B a b c d g - B b^{2} c^{2} g} \right )}}{d^{2}} + x \left (A a g - B a g + \frac {B b c g}{d}\right ) + \left (B a g x + \frac {B b g x^{2}}{2}\right ) \log {\left (\frac {e \left (c + d x\right )^{2}}{\left (a + b x\right )^{2}} \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________